package com.otitan.la.forest.system.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

/**
 * 用户角色关系表
 *
 * @author jiacs
 * @email xxx
 * @date 2020-09-15 10:34:18
 */
@Data
@TableName("\"SYS_USER_ROLE\"")
@ApiModel("用户角色关系表实体")
@AllArgsConstructor
@NoArgsConstructor
public class UserRoleEntity implements Serializable {
    private static final long serialVersionUID = 1L;

    public UserRoleEntity(String roleId, String userId) {
        this.roleId = roleId;
        this.userId = userId;
    }

    /**
     * 角色主键
     */
    @ApiModelProperty(value = "角色主键", required = false)
    @TableId("\"ROLE_ID\"")
    private String roleId;

    /**
     * 用户主键
     */
    @ApiModelProperty(value = "用户主键", required = false)
    // @NotEmpty(message = "用户主键不能为空")
    // @Length(max = 36, message = "用户主键不能超过 36 个字符")
    @TableField("\"USER_ID\"")
    private String userId;

    /**
     * 创建用户
     */
    @ApiModelProperty(value = "创建用户", required = false)
    @TableField(value = "\"CREATE_USER\"", fill = FieldFill.INSERT)
    private String createUser;

    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间", required = false)
    // @NotEmpty(message = "创建时间不能为空")
    // @Length(max = 11, message = "创建时间不能超过 11 个字符")
    @TableField(value = "\"CREATE_DATE\"", fill = FieldFill.INSERT)
    private Date createDate;

}
